#ifndef ALLOC_H
#define ALLOC_H

typedef struct AllocHTItem{
	int *key;
	struct AllocHTItem* ptrnext;
} AllocHTItem;

typedef AllocHTItem* AllocHTable[HTSIZE];

AllocHTable* AllocTable; 


void AllocInsert ( int *key );
AllocHTItem* AllocSearch ( int *key );
void AllocInsert ( int *key );
void AllocClearAll ( );
void AllocDelete ( int *key );



// bezpecne funkce malloc a realloc
void* MyMalloc(int nSize, char *psFile, int nLine);
void* MyRealloc(void *ptr, int nSize, char *psFile, int nLine);
void  MyFree(void *ptr, char *psFile, int nLine); 

void AllocClearMemmory();
void AllocInit ();
void _debug_printAllocTable();

// natvrdo malloc -> MyMalloc, realloc -> MyRealloc
#define malloc(size) MyMalloc((size), __FILE__, __LINE__)
#define realloc(ptr, size) MyRealloc((ptr), (size), __FILE__, __LINE__)
#define free(ptr) MyFree((ptr), __FILE__, __LINE__)



 


#endif